import java.io.File;

public class Fle {


    public static void main(String[] args) {

        String file = "F:/phpstudy/PHPTutorial/WWW/java-test";
        File fd = new File(file);
        if(fd.isDirectory()){
            System.out.println("目录 " + file);
            String[] ds = fd.list();
            for(String fi : ds){
                File ff = new File(file+"/" + fi);
                if(ff.isDirectory()){
                    System.out.println(fi+" is a director");
                }else{
                    System.out.println(fi+" is a file");
                }
            }
        }





    }
}